<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>我的参团</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <!--weui.min.css-->
    <link rel="stylesheet" href="/static/index/css/page/base.css"/>
    <link rel="stylesheet" href="/static/index/css/page/font.css"/>
    <link rel="stylesheet" href="/static/index/jquery_weui/css/swiper.min.css"/>
    <link rel="stylesheet" type="text/css" href="/static/index/jquery_weui/lib/weui.min.css">
    <!--jquery-weui.min.css-->
    <link rel="stylesheet" type="text/css" href="/static/index/jquery_weui/css/jquery-weui.min.css">
    <link rel="stylesheet" href="/static/index/css/page/personal.css" />
</head>
<body>
<div class="pageControl wallet bg-f5">
    <!--主体-->
    <div class="main">
        <div class="bg-di"></div>
        <div class="msui_nav msui_navTop">
            <a class="msui_navTop-back" href="javascript:history.back();"><i class="micon-back"></i></a>
            <h1 class="msui_navTop-title">余额提现</h1>
        </div>
    </div>
    <div class="weui-cells">
        <a class="weui-cell wallet-mode weui-cell_access" href="">
            <div class="weui-cell__hd"><img class="mode-img" src="/static/index/img/w1.png"></div>
            <div class="weui-cell__bd">
                <p class="fs08 cl-3333 mode-title">提现到支付宝</p>
            </div>
            <div class="weui-cell__ft">
                <span class="cl-3333"></span>
            </div>
        </a>
    </div>
    <div class="weui-cells">
        <div class="weui-cell">
            <div class="weui-cell__bd">
                <p class='cl-3333 fs07'>提现金额</p>
                <p class="wallet-price">
                    <span class="cl-3333 fs19">￥</span>
                    <input type="text" id="num" class="weui-input mode-input" placeholder="请输入提现金额"/>
                </p>
            </div>
        </div>
        <div class="weui-cell">
            <div class="weui-cell__bd">
                <p class="cl-9999 fs07">当前余额 <span>{$money}</span> 元 , <a class="cl-209 allPrice">全部提现</a></p>
            </div>
        </div>
    </div>
    <input type="hidden" id="typer" value=""/>
    <p class="cl-9999 fs06 wallet-info"> <span>2</span>小时内到账</p>
    <a id="next" class="wallet-btn1 bg-ff7 cl-f">提现</a>
    <!--支付方式-->
    <div id="wallet-mode1">
        <div class="zhe1"></div>
        <div class="wallet-mode1">
            <p class="fs07">选择提现位置</p>
            <div class="weui-cells_radio">
                <label class="weui-cell weui-check__label mode-list" for="x1">
                    <div class="weui-cell__hd">
                        <input checked="checked" id="x1" type="radio" class="weui-check" name="checked"/>
                        <i class="weui-icon-checked"></i>
                    </div>
                    <div class="weui-cell__bd">
                        <span><img src="/static/index/img/w1.png" alt=""/></span><span class="mode-txt">支付宝提现</span>
                    </div>
                </label>
                <label class="weui-cell weui-check__label mode-list" for="x2">
                    <div class="weui-cell__hd">
                        <input id="x2" type="radio" class="weui-check" name="checked"/>
                        <i class="weui-icon-checked"></i>
                    </div>
                    <div class="weui-cell__bd">
                        <span><img src="/static/index/img/w2.png" alt=""/></span><span class="mode-txt">微信提现</span>
                    </div>
                </label>
            </div>
            <div class="wallet-qu1">
                <a href="" class="wallet-qu cl-9999 fs07">取消</a>
            </div>
        </div>
    </div>
    <!--输入密码-->
   <!-- <div class="wallet-password">
        <div class="zhe1"></div>
        <div class="wallet-password-bg  js-content">
            <p class="passWord-title"><a class="weui-icon-cancel" href=""></a> <span class="cl-9999 fs07">请输入支付密码</span></p>
            <p class="fs12 text-center passWord-price">￥ <span>100.00</span></p>
            <div class="weui-cell setTradePsd">
                <div class="weui-cell__bd js-content">
                    <span></span>
                    <span></span>
                    <span></span>
                    <span></span>
                    <span></span>
                    <span></span>
                    <input class="weui-input" type="number"  placeholder="请输入新手机号码">
                </div>
            </div>
        </div>
    </div>-->
   <!-- &lt;!&ndash;支付成功&ndash;&gt;
    <div class="cash-succ">
        <div class="msui_nav msui_navTop">
            <h1 class="msui_navTop-title">提现详情</h1>
        </div>
        <div class="f5"></div>
        <div class="text-center"><img src="/static/index/img/succ2.png" alt=""/></div>
        <p class="text-center wallet-succ1">提现申请已提交</p>
        <div class="weui-cell">
            <div class="weui-cell__bd">
                <p class="cl-9999">支付宝</p>
            </div>
            <div class="weui-cell__ft">
                <span class="cl-3333">18665555555（账户）</span>
            </div>
        </div>
        <div class="weui-cell">
            <div class="weui-cell__bd">
                <p class="cl-9999">提现金额</p>
            </div>
            <div class="weui-cell__ft">
                <span class="cl-3333">￥100元</span>
            </div>
        </div>
        <a href="wallet.html" class="wallet-btn cl-f bg-ff7">完成</a>
    </div>
    &lt;!&ndash;余额不足&ndash;&gt;
    <div class="err-bg1">
        <div class="zhe1"></div>
        <div class="cash-err1">
            <p>您的余额不足, 请稍后再试</p>
            <div class="wallet-qu1">
                <a href="" class="cl-ff7">确认</a>
            </div>
        </div>
    </div>
    &lt;!&ndash;网络不稳定&ndash;&gt;
    <div class="err-bg2">
        <div class="zhe1"></div>
        <div class="cash-err1">
            <p>您的网络出现问题, 请稍后再试</p>
            <div class="wallet-qu1">
                <a href="" class="cl-ff7">确认</a>
            </div>
        </div>
    </div>-->
</div>
<!-- jquery-2.1.4 -->
<script type="text/javascript" src="/static/index/jquery_weui/lib/jquery-2.1.4.js"></script>
<!-- jquery-weui.min.js -->
<script type="text/javascript" src="/static/index/jquery_weui/js/jquery-weui.min.js"></script>
<script src="/static/index/jquery_weui/js/swiper.min.js"></script>
<script>
    $(document.body).on('keyup','.wallet-password .js-content input',function(){
        if($(this).val().length>=6){
            var num=$(this).val().substr(0,6);
            $(this).val(num);
        }
        if($(this).val().length>=6){
            $('.cash-succ').show();
        }
        $('.js-content>span').each(function(){
            $(this).html('');
        })
        var psdLength=$(this).val().length;
        for(var i=0;i<psdLength;i++){
            $('.js-content>span').eq(i).html('*');
        }
    })
    $(".wallet-qu").click(function (e) {
        e.preventDefault();
        $('#wallet-mode1').hide();
    })
    $(".weui-icon-cancel").click(function (e) {
        e.preventDefault();
        $('.wallet-password').hide();
    })
    $(".wallet-mode").click(function (e) {
        e.preventDefault();
        $('#wallet-mode1').show();
    })
    $(".wallet-btn1").click(function (e) {
        e.preventDefault();
        $('.wallet-password').show();
    })
    $(".weui-cells_radio").on('click','.mode-list', function () {
        var img=$(this).children().children().children('img').attr('src');
        var txt=$(this).children().children('.mode-txt').html();
        $('#wallet-mode1').hide();
        $(".mode-img").attr('src',img)
        $(".mode-title").html(txt)
    })
    $(".allPrice").click(function (e) {
        e.preventDefault();
        var p=$(this).prev().html();
        console.log(p);
        $('.mode-input').val(p);
    })

    //支付
    $("#x1").click(function(){
        //支付宝
        $("#typer").val('2');

    });
    $("#x2").click(function(){
        //微信
        $("#typer").val('1');
    });
    $("#next").click(function(){
        var money = {$money};
        var typer = $("#typer").val();
        var num = $("#num").val();
        if(num > money){
            alert("您的余额不足请及时充值");return;
        }
        if(typer == "1"){
            location.href="/index/Merchpay/test?num="+num;

        }
    });
</script>
</body>
</html>

